package cn.bincker.mycaptcha.letter.entity;

import cn.bincker.mycaptcha.basic.entity.MyCaptcha;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@NoArgsConstructor
public class LetterCaptcha implements MyCaptcha, Cloneable {
    @Getter
    @Setter
    private String image;

    public LetterCaptcha(String image) {
        this.image = image;
    }

    @Override
    public LetterCaptcha clone() {
        try {
            LetterCaptcha clone = (LetterCaptcha) super.clone();
            clone.image = image;
            return clone;
        } catch (CloneNotSupportedException e) {
            throw new AssertionError();
        }
    }
}
